import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'layout',
      component: () => import('../layout/Layout.vue'),
      children: [
        {
          path: '',
          name: 'home',
          component: HomeView,
        },
        {
          path: '/about',
          name: 'about',
          component: () => import('../views/AboutView.vue'),
        },
        {
          path: '/mapSystem',
          name:'mapSystem',
          component: () => import('../views/mapSystem/MapSystem.vue'),
        },
        {
          path:'/store',
          name:'store',
          component: () => import('../views/store/Store.vue'),
        },
        {
          path:'/todoList',
          name: 'todoList',
          component:()=>import('../views/todoList/TodoLists.vue'),
        },
        {
          path:'/personal',
          name:'personal',
          component:()=>import('../views/personal/Personal.vue'),
        },
        {
          path:'/news',
          name:'news',
          component:()=>import('../views/news/News.vue'),
        },
         //商城页
    {
      path: '/mall',
      name:'mall',
      component: () => import('../views/mall/Mall.vue'),
    }
    ,
      //消息通知页
      {
        path: '/message',
        name:'message',
        component: () => import('../views/message/Messages.vue'),
      },
      ]
    },
  
    {
      path:'/login',
      name: 'login',
      component: () => import('../views/login/Login.vue'),
    },
    //注册组件
    {
      path: '/register',
      name:'register',
      component: () => import('../views/login/components/Register.vue'),
    },
    //忘记密码组件
    {
      path: '/forgot-password',
      name: 'forgot-password',
      component: () => import('../views/login/components/ForgotPasswordPage.vue'),
    },
    //开屏页
    {
      path: '/splash',
      name:'splash',
      component: () => import('../views/start/index.vue'),
    },
    //商店注册页
    {
      path: '/createStore',
      name:'createStore',
      component: () => import('../views/store/components/CreateStore.vue'),
    
    },
  
    
   
  ],
})

export default router
